{# empty Twig template #}
{% extends 'ProjResManBundle::layout.html.twig' %}

{% block title %}ProjResManBundle:HeadMaster:activities{% endblock %}

{% block header_menu_login_href %}{% if template_content.auth.isAuth == false %}{{ template_content.header.menu.login }}{% else %}{{ template_content.header.menu.logout }}{% endif %}{% endblock %}
{% block header_menu_login_text %}{% if template_content.auth.isAuth == false %}{{ template_content.header.text.login }}{% else %}{{ template_content.header.text.logout }}{% endif %}{% endblock %}
{% block header_menu_login_user %}{% if template_content.auth.isAuth == true %}{{ template_content.auth.user }}{% endif %}{% endblock %}
{% block header_menu_login_message %}{% if template_content.auth.isAuth == true %}User:{% endif %}{% endblock %}
{% block content %}
<div id="page_content">
    <div id="submenu">
        <div id="submenu_float1">
            <div id="submenu_float2">
                <ul>
                    {% block submenu -%}
                    {% for item in template_content.content.submenu %}
                    <ul class="submenu_option">
                        <a href={{ item.href }}>
                        <li class="submenu_header">{{ item.title }}</li>
                        <li class="submenu_details">{{ item.title_desc }}</li>
                    </a>
                    </ul>
                    {% endfor %}
                    {% endblock %}
                </ul>
            </div>
        </div>
    </div>
        
    <div id="container">
        <table class="table table-hover">
            <thead>
                 <tr>
                   <th>Descriere</th>
                   <th>Data inceperii</th>
                   <th>Data finalizarii</th>
                   <th>Data crearii</th>
                </tr>
            </thead>
            <tbody>
                {% for task in tasks %}
                    <tr>
                        <td>{{ task.description }}</td>
                        <td>{{ task.startDate.format('Y-m-d') }}</td>
                        <td>{{ task.endDate.format('Y-m-d') }}</td>
                        <td>{{ task.createdDate.format('Y-m-d') }}</td>
                        <td>
                            <a href="{{ path('headmaster_tasks_details', {"activity_id": activityId, "task_id": task.id}) }}">
                                <button type="button" class="btn btn-info">Detalii</button>
                            </a>
                        </td>
                    </tr>
                {% endfor %}
            </tbody>
        </table>
            
        <div style="padding-bottom: 50px">
            <a href="{{ path("headmaster_activity_details", {"activity_id": activityId}) }}">
                <button class="btn btn-info" style="float: left; margin-right: 20px; text-decoration: none">Inapoi</button>
            </a>
            <a href="{{ path('headmaster_tasks_add', {"activity_id": activityId}) }}" style="float: left; margin-right: 20px; text-decoration: none">
                <button class="btn btn-info">Adauga task</button>
            </a>
        </div>
    </div>
</div>
    
{% endblock %}
